package com.itheima.mapper;

import com.itheima.pojo.Sales;
import com.itheima.pojo.SalesQueryParam;
import org.apache.ibatis.annotations.*;

import java.util.List;
import java.util.Map;

/**
 * @author 3shy.cn
 * @description SalesMapper
 */

@Mapper
public interface SalesMapper {
    List<Sales> page(SalesQueryParam param);

    void deleteByIds(List<Integer> ids);


    @Insert("insert into sales(emp_id,price,sale_time,vip_id) values(#{empId},#{price},#{saleTime},#{vipId})")
    @Options(useGeneratedKeys = true, keyProperty = "id")
    void insert(Sales sales);
    /**
     * 根据ID查询订单
     */

    Sales getById(Integer id);

    /**
     * 更新员工基本信息
     */
    void updateById(Sales sales);

}
